package com.homelock.service;

import java.util.List;

import javax.annotation.Resource;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.homelock.common.util.PageUtils;
import com.homelock.common.vo.PageReq;
import com.homelock.common.vo.PageResp;
import com.homelock.entity.Demo;
import com.homelock.entity.DemoExample;
import com.homelock.mapper.DemoMapper;

@Service
public class DemoService extends BasicService {
	Logger _log = LoggerFactory.getLogger(DemoService.class);

	@Resource
	private DemoMapper demoMapper = null;

	public PageResp pageList(PageReq param) {
		Page page = PageHelper.startPage(param.getStartPage(), param.getPageSize());
		List<Demo> vList = demoMapper.selectByExample(new DemoExample());
		return PageUtils.getPageInfo(page,param.getStartPage(),vList);
	}
}
